Skip to content

Conversation

@Free-Pascal-meets-SDL-Website
Copy link
Collaborator

  • updates sdlscancode.inc to version 2.26.2
  • moves translated code from SDL_keycode.h from sdlscancode.inc into separate, new file sdlkeycode.inc
  • updates sdlkeycode.inc to version 2.26.2


const
SDLK_SCANCODE_MASK = 1 shl 30;
//#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we define this as a Pascal function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to keep it as is, because a function call has a little more overhead compared to just reading a constant value. Since scancodes may be requested in a large amount and rapidly, this means a large amount of function calls would result.

A second point why I opt'ed for keeping it as is, it saved some time :-).

Feel free to merge this if you approve my answer.

@Free-Pascal-meets-SDL-Website Free-Pascal-meets-SDL-Website merged commit e37c674 into PascalGameDevelopment:master Feb 5, 2023
@Free-Pascal-meets-SDL-Website Free-Pascal-meets-SDL-Website deleted the update-sdlscancode branch March 15, 2025 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants